class AddUserVerifiesUserInfo < ActiveRecord::Migration
  def self.up
    ActiveRecord::Base.connection.execute("ALTER TABLE user_verifies ADD COLUMN nick_name varchar(20) after user_id")
    ActiveRecord::Base.connection.execute("ALTER TABLE user_verifies ADD COLUMN email varchar(50) after nick_name")
    ActiveRecord::Base.connection.execute("ALTER TABLE user_verifies ADD COLUMN status tinyint(1) default 0 after verify_code")
    ActiveRecord::Base.connection.execute("ALTER TABLE user_verifies ADD COLUMN flag tinyint(4) default 0 after status")
    ActiveRecord::Base.connection.execute("ALTER TABLE user_verifies ADD COLUMN remarks text after flag")
  end

  def self.down
    remove_column :user_verifies, :nick_name
    remove_column :user_verifies, :email
    remove_column :user_verifies, :status
    remove_column :user_verifies, :flag
    remove_column :user_verifies, :remarks
  end
end
